package cn.edu.zhku.citrusmonitor.baseinfo.technology.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import cn.edu.zhku.citrusmonitor.domain.Bean;
import cn.edu.zhku.citrusmonitor.domain.TbTechnology;

public interface TechnologyDao {
	/**
	 * 插入技术信息
	 * @param technology
	 * @return
	 */
	int insertTechnology(TbTechnology technology) throws SQLException;
	/**
	 * 删除技术信息
	 * @param technologyId
	 * @return
	 */
	int deleteTechnology(String technologyId) throws SQLException;
	/**
	 * 修改技术信息
	 * @param technology
	 * @return
	 */
	int modifyTechnology(TbTechnology technology) throws SQLException;
	/**
	 * 根据主键查询技术信息，返回TbTechnology类
	 * @param technologyId
	 * @return
	 */
	TbTechnology selectTechnologyById(String technologyId) throws SQLException;
	/**
	 * 根据类别查询技术信息
	 * @param category
	 * @return
	 */
	List<TbTechnology> selectTechnologyByCategory(String category) throws SQLException;
	/**
	 * 根据id查出文件字段的值
	 * @param technologyId
	 * @return
	 */
	String selectFilePathById(String technologyId) throws SQLException ;
	/**
	 * 根据条件统计信息数，条件为空则统计所有
	 * @param condition
	 * @return
	 */
	int countList(Map<String, Object> condition) throws SQLException ;
	/**
	 * 根据条件查询技术信息，条件为空则查询所有，模糊查询
	 * @param pageSize
	 * @param currentPage
	 * @param condition
	 * @return
	 */
	List<TbTechnology> selectTechnologyList(int pageSize, int currentPage, Map<String, Object> condition) throws SQLException ;
	/**
	 * 根据类别查询size条信息，按时间排序
	 * @param size
	 * @param category
	 * @return
	 * @throws SQLException
	 */
	List<TbTechnology> selectTechnologyByCategoryLimit(int size, String category) throws SQLException;
	/**
	 * 根据类别统计信息数量
	 * @param category
	 * @return
	 */
	int countList(String category)throws SQLException ;
	/**
	 * 根据类别查询技术信息，=查询
	 * @param pageSize
	 * @param currentPage
	 * @param category
	 * @return
	 */
	List<Bean> selectTechnologyList(int pageSize, int currentPage, String category) throws SQLException ;
	/**
	 * 根据主键查询技术信息，返回Bean类
	 * @param technologyId
	 * @return
	 * @throws SQLException
	 */
	Bean getTechnologyById(String technologyId) throws SQLException;
	/**
	 * 批量删除
	 * @param params
	 * @return
	 * @throws SQLException
	 */
	int deleteTechnologysByIds(Object [][]params) throws SQLException;
}
